package com.bdq.search.infrastructure.persistence.mysql.service;

import com.bdq.search.infrastructure.persistence.mysql.pojo.SearchHistory;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author malei
* @description 针对表【search_history(搜索历史表)】的数据库操作Service
* @createDate 2024-05-26 16:57:09
*/
public interface SearchHistoryService extends IService<SearchHistory> {

    /**
     * @param userId
     * @param keyword
     * @return
     */
    Boolean deleteSearchHistory(Long userId, String keyword);

    /**
     * @param userId
     * @return
     */
    List<SearchHistory> listByUserId(Long userId);

    /**
     * @param userId
     * @return
     */
    Boolean deleteByUserId(Long userId);

    /**
     * @param deleteIds
     * @return
     */
    Boolean deleteBatchByIds(List<Long> deleteIds);
}
